package com.treasure.mall.biz.entity.statistics;

import com.treasure.mall.biz.entity.Base2PO;
import com.treasure.mall.zbq.common.constant.Constant;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 交易金额统计
 *
 * @author allan
 * @version 1.0.0
 * @date 2020/9/25
 */
@Entity
@Table(name = "zb_deal_amount_statistics")
@Setter
@Getter
@Cacheable(false)
public class DealAmountStatisticsPO extends Base2PO {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;
    /**
     * 日期
     */
    @Column(name = "date", columnDefinition = Constant.DATE_COLUMN_DEFINITION)
    private LocalDate date;
    /**
     * 已支付金额
     */
    @Column(name = "payed_amount", scale = 2, precision = 10)
    private BigDecimal payedAmount;
    /**
     * 待支付金额
     */
    @Column(name = "unpay_amount", scale = 2, precision = 10)
    private BigDecimal unpayAmount;
    /**
     * 退款金额
     */
    @Column(name = "refund_amount", scale = 2, precision = 10)
    private BigDecimal refundAmount;
    /**
     * 微信支付金额
     */
    @Column(name = "wechat_amount", scale = 2, precision = 10)
    private BigDecimal wechatAmount;
    /**
     * 支付宝支付金额
     */
    @Column(name = "alipay_amount", scale = 2, precision = 10)
    private BigDecimal alipayAmount;
    /**
     * 余额支付金额
     */
    @Column(name = "balance_amount", scale = 2, precision = 10)
    private BigDecimal balanceAmount;
    @Column(name = "wechat_refund", scale = 2, precision = 10)
    private BigDecimal wechatRefund;
    @Column(name = "alipay_refund", scale = 2, precision = 10)
    private BigDecimal alipayRefund;
    @Column(name = "balance_refund", scale = 2, precision = 10)
    private BigDecimal balanceRefund;
}
